package com.nervenets.web.enumeration;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.nervenets.i18n.Translator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * Created by Joe
 * Date: 12-12-4 下午11:09
 * Email: joesupper@vip.qq.com
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ApiModel("性别：male男, female女")
public enum Gender {
    male, female;

    @ApiModelProperty("值")
    public String getValue() {
        return this.name();
    }

    @ApiModelProperty("显示文本")
    public String getText() {
        return Translator.translate(this);
    }
}
